using System;

namespace System.ComponentModel
{
    [AttributeUsage(AttributeTargets.All)]
    public sealed class BrowsableAttribute : Attribute
    {
        private bool browsable = true;

        
        public BrowsableAttribute(bool browsable)
        {
            this.browsable = browsable;
        }

        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return true;
            }
            BrowsableAttribute attribute = obj as BrowsableAttribute;
            if (attribute != null)
            {
                return (attribute.Browsable == this.browsable);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return this.browsable.GetHashCode();
        }

        public bool Browsable
        {
            get
            {
                return this.browsable;
            }
        }
    }

    [AttributeUsage(AttributeTargets.All)]
    public class CategoryAttribute : Attribute
    {
        private string categoryValue;

        public CategoryAttribute()
            : this("Default")
        {
        }

        public CategoryAttribute(string category)
        {
            this.categoryValue = category;
        }

        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return true;
            }
            if (obj is CategoryAttribute)
            {
                return this.Category.Equals(((CategoryAttribute)obj).Category);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return this.Category.GetHashCode();
        }

        public string Category
        {
            get
            {
                return this.categoryValue;
            }
        }
    }

 


    [AttributeUsage(AttributeTargets.All)]
    public class DescriptionAttribute : Attribute
    {
        private string description;

        public DescriptionAttribute() : this(string.Empty){}

        public DescriptionAttribute(string description)
        {
            this.description = description;
        }

        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return true;
            }
            DescriptionAttribute attribute = obj as DescriptionAttribute;
            if (attribute != null)
            {
                return (attribute.Description == this.Description);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return this.description.GetHashCode();
        }

        public virtual string Description
        {
            get
            {
                return this.description;
            }
        }
    }
}
